﻿@using Orchard.Comments.Models
@using Orchard.ContentManagement

@{
    CommentPart comment = Model.ContentPart;
    var settings = WorkContext.CurrentSite.As<CommentSettingsPart>();
}

@if (settings.ModerateComments) {
    <ul class="action-links">
        @if (comment.Status != CommentStatus.Pending) {
            <li class="action-link">
                @Html.Link(@T("Approve").Text, Url.Action("Approve", "Admin", new {area = "Orchard.Comments", comment.Id, returnUrl = Request.RawUrl }), new {itemprop = "UnsafeUrl"})
            </li>
        }
        else {
            <li class="action-link">
                @Html.Link(@T("Unapprove").Text, Url.Action("Unapprove", "Admin", new {area = "Orchard.Comments", comment.Id, returnUrl = Request.RawUrl }), new {itemprop = "UnsafeUrl"})
            </li>
        }
    </ul>
}